{"ast":null,"code":"import _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport { createTheme, useCacheToken, useStyleRegister } from '@ant-design/cssinjs';\nimport React from 'react';\nimport version from '../version';\nimport { PresetColors } from './interface';\nimport defaultDerivative from './themes/default';\nimport defaultSeedToken from './themes/seed';\nimport formatToken from './util/alias';\nimport genComponentStyleHook from './util/genComponentStyleHook';\nimport statisticToken, { merge as mergeToken, statistic } from './util/statistic';\nvar defaultTheme = createTheme(defaultDerivative);\nexport {\n// colors\nPresetColors,\n// Statistic\nstatistic, statisticToken, mergeToken,\n// hooks\nuseStyleRegister, genComponentStyleHook };\n// ================================ Context =================================\n// To ensure snapshot stable. We disable hashed in test env.\nexport var defaultConfig = {\n  token: defaultSeedToken,\n  hashed: true\n};\nexport var DesignTokenContext = /*#__PURE__*/React.createContext(defaultConfig);\n// ================================== Hook ==================================\nexport function useToken() {\n  var _React$useContext = React.useContext(DesignTokenContext),\n    rootDesignToken = _React$useContext.token,\n    hashed = _React$useContext.hashed,\n    theme = _React$useContext.theme,\n    components = _React$useContext.components;\n  var salt = \"\".concat(version, \"-\").concat(hashed || '');\n  var mergedTheme = theme || defaultTheme;\n  var _useCacheToken = useCacheToken(mergedTheme, [defaultSeedToken, rootDesignToken], {\n      salt: salt,\n      override: Object.assign({\n        override: rootDesignToken\n      }, components),\n      formatToken: formatToken\n    }),\n    _useCacheToken2 = _slicedToArray(_useCacheToken, 2),\n    token = _useCacheToken2[0],\n    hashId = _useCacheToken2[1];\n  return [mergedTheme, token, hashed ? hashId : ''];\n}","map":{"version":3,"names":["createTheme","useCacheToken","useStyleRegister","React","version","PresetColors","defaultDerivative","defaultSeedToken","formatToken","genComponentStyleHook","statisticToken","merge","mergeToken","statistic","defaultTheme","defaultConfig","token","hashed","DesignTokenContext","createContext","useToken","useContext","rootDesignToken","theme","components","salt","mergedTheme","override","Object","assign","hashId"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/theme/internal.js"],"sourcesContent":["import { createTheme, useCacheToken, useStyleRegister } from '@ant-design/cssinjs';\nimport React from 'react';\nimport version from '../version';\nimport { PresetColors } from './interface';\nimport defaultDerivative from './themes/default';\nimport defaultSeedToken from './themes/seed';\nimport formatToken from './util/alias';\nimport genComponentStyleHook from './util/genComponentStyleHook';\nimport statisticToken, { merge as mergeToken, statistic } from './util/statistic';\nconst defaultTheme = createTheme(defaultDerivative);\nexport {\n// colors\nPresetColors,\n// Statistic\nstatistic, statisticToken, mergeToken,\n// hooks\nuseStyleRegister, genComponentStyleHook };\n// ================================ Context =================================\n// To ensure snapshot stable. We disable hashed in test env.\nexport const defaultConfig = {\n  token: defaultSeedToken,\n  hashed: true\n};\nexport const DesignTokenContext = /*#__PURE__*/React.createContext(defaultConfig);\n// ================================== Hook ==================================\nexport function useToken() {\n  const {\n    token: rootDesignToken,\n    hashed,\n    theme,\n    components\n  } = React.useContext(DesignTokenContext);\n  const salt = `${version}-${hashed || ''}`;\n  const mergedTheme = theme || defaultTheme;\n  const [token, hashId] = useCacheToken(mergedTheme, [defaultSeedToken, rootDesignToken], {\n    salt,\n    override: Object.assign({\n      override: rootDesignToken\n    }, components),\n    formatToken\n  });\n  return [mergedTheme, token, hashed ? hashId : ''];\n}"],"mappings":";AAAA,SAASA,WAAW,EAAEC,aAAa,EAAEC,gBAAgB,QAAQ,qBAAqB;AAClF,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,YAAY;AAChC,SAASC,YAAY,QAAQ,aAAa;AAC1C,OAAOC,iBAAiB,MAAM,kBAAkB;AAChD,OAAOC,gBAAgB,MAAM,eAAe;AAC5C,OAAOC,WAAW,MAAM,cAAc;AACtC,OAAOC,qBAAqB,MAAM,8BAA8B;AAChE,OAAOC,cAAc,IAAIC,KAAK,IAAIC,UAAU,EAAEC,SAAS,QAAQ,kBAAkB;AACjF,IAAMC,YAAY,GAAGd,WAAW,CAACM,iBA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